﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

[Table("QHSE_XY_SYS_ORGANIZATION")]
//[Table("QHSE_SYS_ORGANIZATION")]
public class QHSESysOrganization : EntityBase
{
    public QHSESysOrganization()
    {
    }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("CREATE_TIME")]
    public DateTime? CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("UPDATE_TIME")]
    public DateTime? UpdateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 组织机构风险等级
    /// </summary>
    [Column("RISK_LEVEL")]
    public RiskLevelType RiskLevel { get; set; } = RiskLevelType.NoneRisk;

    /// <summary>
    /// 排序值
    /// </summary>
    [Column("DATA_SORT")]
    public int DataSort { get; set; } = 99;

    /// <summary>
    /// 状态
    /// </summary>
    [Column("ROW_STATE")]
    public int RowState { get; set; } = 0;

    /// <summary>
    /// id全路径
    /// </summary>
    [MaxLength(1024)]
    [Column("ID_PATH")]
    public string? IdPath { get; set; } = "";

    /// <summary>
    /// 名称全路径
    /// </summary>
    [MaxLength(1024)]
    [Column("NAME_PATH")]
    public string? NamePath { get; set; } = "";

    /// <summary>
    /// 组织机构级别
    /// </summary>
    [MaxLength (32)]
    [Column("ORGANIZATION_LEVEL")]
    public string? OrganizationLevel { get; set; }

    /// <summary>
    /// 组织机构编码
    /// </summary>
    [MaxLength(32)]
    [Column("ORGANIZATION_CODE")]
    public string? OrganizationCode { get; set; } = "";

    /// <summary>
    /// 组织机构ID
    /// </summary>
    [MaxLength(34)]
    [Column("ORGANIZATION_ID")]
    [Key]
    public string OrganizationId { get; set; } = "";

    /// <summary>
    /// 父级ID
    /// </summary>
    [MaxLength(34)]
    [Column("PARENT_ID")]
    public string ParentId { get; set; } = "";

    /// <summary>
    /// 组织机构名称(全名)
    /// </summary>
    [MaxLength(64)]
    [Column("ORGANIZATION_NAME")]
    public string OrganizationName { get; set; } = "";

    /// <summary>
    /// 组织机构名称缩写
    /// </summary>
    [MaxLength(64)]
    [Column("ORGANIZATION_ABBREVIATION")]
    public string? OrganizationAbbreviation { get; set; } = "";

}
